<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/stylesheets/css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="/stylesheets/css/bootstrap-theme.min.css" />
    <link rel="stylesheet" type="text/css" href="/stylesheets/css/style.css"/>
    <script type="text/javascript" src="/javascripts/jquery.js"></script>
    <script type="text/javascript" src="/javascripts/bootstrap.min.js"></script>
    <script>

    </script>
</head>
<body>
<div class="container">
    <!-- index页面 -->
    <div class="layout_index">
        <h3><b>欢迎使用机架产品记录追踪工具</b></h3>
        <%if(message != 1){%>
            <span style="color:red" ><%=message%></span>
        <%}%>
        <h4>产品简介</h4>
        <br />
        <%if(tpSub == 'FCC'){%>
            <img class="img-rounded" src="../images/slqmkzq.jpg" style="width:120px;height:100px;" />
        <%}else{%>
            <img class="img-rounded" src="../images/slqm.png" style="width:120px;height:100px;" />
        <%}%>
        <p>
            产品名称：<%=cp.pn%>
            <br />
            出厂日期：<%=cp.cd%>
            <br />
            部署地点：<%=cp.ds%>
            <br />
            批号：<%=cp.bn%>
            <br />
            产品型号：<%=cp.tp%>
            <br />
            <%cp.sds.forEach(function(sd){%>
              <%=sd.sk%>：<%=sd.sv%>
            <%})%>
            <br />
            <%cp.sps.forEach(function(sp){%>
              <%=sp.pk%>：<%=sp.pv%><br/>
            <%})%>
        </p>
        <p>
            <a data-toggle="modal" class="btn btn-success btn-large" data-target="#login">查看更多信息，请点击登录</a>
        </p>
    </div>

    <!-- 登录页面 -->
    <div class="modal fade" id="login" tabindex="-1" role="dialog"
         aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close"
                            data-dismiss="modal" aria-hidden="true">
                        &times;
                    </button>
                    <h4 id="myModalLabel" class="modal-title"> 登录页面 </h4>
                </div>
                <div class="modal-body">
                    <form name="loginForm" class="form-horizontal" role="form" action="doLogAndFindCp" method="post">
                       <input type="hidden" id="cpid" name="cpId" value="<%=cp._id%>"/>
                       <div class="form-group">
                            <label for="firstname" class="col-sm-2 control-label">用户名：</label>
                            <div class="col-sm-10">
                                <input type="text" name="username" class="form-control" id="firstname"
                                       placeholder="请输入名字">
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="lastname" class="col-sm-2 control-label">密&nbsp;&nbsp;&nbsp;&nbsp;码：</label>
                            <div class="col-sm-10">
                                <input type="password" name="password" class="form-control" id="lastname"
                                       placeholder="请输入密码">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <div class="checkbox">
                                    <label>
                                        <input type="checkbox">
                                        记住密码 </label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="reset" name="reset" class="btn btn-success btn-large">
                                    重置
                                </button>
                                <button type="submit" name="submit" class="btn btn-success btn-large">
                                    登录
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

</div>
</body>
</html>